    <include file="Common:header"/>
    <title></title>
	<css file="__PUBLIC__/Admin/css/category.css" />
    <js file="__PUBLIC__/js/jquery-1.8.2.min.js" />
    <script type="text/javascript">
        var ACTION = "__URL__";
    </script>
    <js file="__PUBLIC__/Admin/js/category.js" />
</head>
<body>

		
        <form action="{:U('addItem')}" method="post">
            <h2>
                <a>所在位置：商品管理>货品列表</a>
            </h2>
            <br/>
           <table class="table1">
            <thead>
                <tr style="background:#72A9D3">
                    <th width="60" align="center">货品ID</th>
                    <foreach name="typeName" item="val">
                        <th>{$val.name}</th>
                    </foreach>
                    <th>库存</th>
                    <th>货号</th>
                    <th width="400">操作</th>
                </tr>
            </thead>
            <tbody>
                <foreach name='itemslist' item='val'>
                <tr class="catgorylist">
                    <td align="center">{$val.id}</td>
                    <foreach name="val.attr" item="v">
                        <td>{$v.value}</td>
                    </foreach>
                    <td>{$val.inventory}</td>
                    <td>{$val.number}</td>
                    <td>
                        <a href="{:U('editCategory',array('cid'=>$n['id']))}">编辑该货品</a> |
                        <a href="javascript:void(0)" class="delcategory" cid="{$n.id}">删除该货品</a>
                    </td>
                </tr>
                </foreach>
                <tr>
                    <td>添加货品></td>
                    <foreach name="spec" item="val">
                        <td>
                            <select name="attr[]">
                                <option value="0">--请选择--</option>
                                <foreach name="val" item="v">
                                    <option value="{$v.id}">{$v.value}</option>
                                </foreach>
                            </select>
                        </td>
                    </foreach>
                    <td>
                        <input type="text" name="inventory">
                    </td>
                     <td>
                        <input type="text" name="number">
                    </td>
                    <td>
                        <input type="hidden" name="gid" value="{$Think.get.gid}">
                        <input type="submit" value="添加货品" class="bt1">
                    </td>
                </tr>
                <if condition="$itemCounts gt 0">
                    <tr>
                        <td colspan="{$pageColspan}" align="center">{$page}</td>
                    </tr>
                </if>
            </tbody>
        </table>
    </form>
</body>
</html>